package com.dhcc.bpm.modules.cost.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;

/**
 * @ClassName CostRule.class
 * @Description  收费规则表实体类
 * @Author xiaFaYu
 * @Date 2019-12-16 14:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
@Data
@TableName("opc_cost_rule")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "CostRule对象", description = "收费规则表")
public class CostRule extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 收费形式
	*/ @JsonSerialize(
			using = ToStringSerializer.class,
			nullsUsing = NullSerializer.class
	)
		@ApiModelProperty(value = "收费形式")
		private Integer costType;
	/**
	* 单笔金额
	*/
		@ApiModelProperty(value = "单笔金额")
		private String singleCharge;
	/**
	* 收费比例
	*/
		@ApiModelProperty(value = "收费比例")
		private String costRatio;
		
	/**
	* 金额字段：按比率收费时使用，意为根据该金额字段的比率进行收费
	*/
		@ApiModelProperty(value = "金额字段")
		private String chargeField;
		
	/**
	* 收费上限
	*/
		@ApiModelProperty(value = "收费上限")
		private String costUpperLimit;
	/**
	* 收费下限
	*/
		@ApiModelProperty(value = "收费下限")
		private String costLowerLimit;
	/**
	* 阶梯式收费
	*/
		@ApiModelProperty(value = "阶梯式收费")
		private String ladderCharge;
	/**
	* 按时收费
	*/
		@ApiModelProperty(value = "按时收费")
		private String timeCharge;
	/**
	* 产品ID
	*/ @JsonSerialize(
			using = ToStringSerializer.class,
			nullsUsing = NullSerializer.class
	)
		@ApiModelProperty(value = "产品ID")
		private Long productId;
	/**
	* 接口ID
	*/
		@ApiModelProperty(value = "接口ID")
		private String apiId;
	/**
	* 描述
	*/
		@TableField(value = "`describe`")
		private String describe;

	/**
	* 刷新状态
	*/
		@ApiModelProperty(value = "刷新状态")
		@JsonSerialize(
				using = ToStringSerializer.class,
				nullsUsing = NullSerializer.class
		)
		private Integer refreshFlag;
	/**
	* 收费周期
	*/
		@ApiModelProperty(value = "收费周期")
		@JsonSerialize(
				using = ToStringSerializer.class,
				nullsUsing = NullSerializer.class
		)
		private Integer costCycle;
	/**
	* 收费金额
	*/
		@ApiModelProperty(value = "收费金额")
		private String costAmount;
}
